<!--
*Author：富行天下团队
 *
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/Sys_User.js此处编写
 -->
<template>
  <div>
    <view-grid :columns="columns" :detail="detail" :editFormFileds="editFormFileds" :editFormOptions="editFormOptions" :searchFormFileds="searchFormFileds"
      :searchFormOptions="searchFormOptions" :table="table" :extend="extend">
    </view-grid>
  </div>
</template>

<script>
import extend from '@/extension/system/Sys_User.js'
import ViewGrid from '@/components/basic/ViewGrid.vue'
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      table: {
        key: 'User_Id',
        footer: 'Foots',
        cnName: '用户管理',
        name: 'User',
        url: '/Users/',
        sortName: 'User_Id',
      },
      extend: extend,
      editFormFileds: {
        UserName: '',
        UserTrueName: '',
        Role_Id: '',
        phoneNo: '',
        userType: '',
        userTypeDist: '',
        userTypeSupp: '',
        Gender: '',
        Enable: '',
        CreateDate: '',
        Creator: '',
        Remark: '',
        HeadImageUrl: '',
        RoleName: '',
        userTypeDataExpress: ''
      },
      editFormOptions: [
        [
          { title: '帐号', required: true, field: 'UserName', disabled: true, colSize: 6 },
          { title: '真实姓名', required: true, field: 'UserTrueName', type: 'text', colSize: 6 },
        ],
        [
          { dataKey: 'roles', title: '角色', required: true, field: 'Role_Id', type: 'drop', colSize: 6 },
          { title: '手机号', required: true, field: 'phoneNo', type: 'phone', colSize: 6 },
        ],
        [
          { dataKey: 'userType', title: '用户类型', field: 'userType', type: 'drop', colSize: 6 },
          { dataKey: 'mall_supplier', title: '供应商', hidden: true, field: 'userTypeSupp', type: 'drop', colSize: 6 },
          { dataKey: 'manudistributorList', title: '分销商', hidden: true, field: 'userTypeDist', type: 'drop', colSize: 6 },
          { dataKey: 'GetDataExpressCode', title: '数据快报商户名称', hidden: true, field: 'userTypeDataExpress', type: 'select', colSize: 6 },
        ],
        [
          { dataKey: 'gender', title: '性别', field: 'Gender', type: 'drop', colSize: 6 },
          { dataKey: 'enable', title: '是否可用', required: true, field: 'Enable', type: 'drop', colSize: 6 },
        ],
        [
          { title: '注册时间', field: 'CreateDate', disabled: true, colSize: 6 },
          { title: '创建人', field: 'Creator', disabled: true, colSize: 6 },
        ],
        [{ title: '备注', field: 'Remark', colSize: 12, type: 'textarea' }],
        [{ title: '头像', field: 'HeadImageUrl', type: 'img', colSize: 6 ,maxFile: 1, multiple: true,storage:'OSS_H',}],
      ],
      searchFormFileds: {
        UserName: '',
        Gender: '',
        DeptName: '',
        Role_Id: '',
        Token: '',
        AppType: '',
        UserTrueName: '',
        CreateDate: '',
        PhoneNo: '',
        Enable: '',
        LastLoginDate: '',
        Address: '',
        Email: '',
      },
      searchFormOptions: [
        [
          { title: '帐号', field: 'UserName' },
          { dataKey: 'gender', title: '性别', field: 'Gender', type: 'drop' },
          { title: '真实姓名', field: 'UserTrueName' },
        ],
        [
          { title: '部门', field: 'DeptName' },
          { dataKey: 'roles', title: '角色', field: 'Role_Id', type: 'drop' },
          { title: 'Token', field: 'Token' },
        ],
        [
          { dataKey: 'ut', title: '登陆设备类型', field: 'AppType', type: 'dropList' },
          { dataKey: 'isphone', title: '手机用户', field: 'IsRegregisterPhone', type: 'drop' },
          { title: '手机号', field: 'PhoneNo' },
        ],
        [
          { dataKey: 'enable', title: '是否可用', field: 'Enable', type: 'drop' },
          { title: '地址', field: 'Address' },
          { title: 'Email', field: 'Email' },
        ],
        [
          { title: '注册时间', field: 'CreateDate', type: 'datetime' },
          { title: '最后登陆时间', field: 'LastLoginDate', type: 'datetime' },
        ],
      ],
      columns: [
        { field: 'UserName', title: '帐号', type: 'string', link: true, width: 120, readonly: true, require: true, align: 'left', sortable: true },
        { field: 'User_Id', title: 'User_Id', type: 'int', width: 90, hidden: true, readonly: true, require: true, align: 'left' },
        { field: 'Gender', title: '性别', type: 'int', bind: { key: 'gender', data: [] }, width: 100, align: 'left' },
        { field: 'HeadImageUrl', title: '头像', type: 'img', width: 150, align: 'left' },
        { field: 'Dept_Id', title: 'Dept_Id', type: 'int', width: 90, hidden: true, align: 'left' },
        { field: 'DeptName', title: '部门', type: 'string', width: 150, hidden: true, align: 'left' },
        { field: 'Role_Id', title: '角色', type: 'int', bind: { key: 'roles', data: [] }, width: 150, require: true, align: 'left' },
        { field: 'RoleName', title: 'RoleName', type: 'string', width: 90, hidden: true, require: true, align: 'left' },
        { field: 'Token', title: 'Token', type: 'string', width: 180, hidden: true, align: 'left' },
        { field: 'AppType', title: '登陆设备类型', type: 'int', bind: { key: 'ut', data: [] }, width: 150, hidden: true, align: 'left' },
        { field: 'UserTrueName', title: '真实姓名', type: 'string', width: 150, require: true, align: 'left' },
        { field: 'CreateDate', title: '注册时间', type: 'datetime', width: 135, readonly: true, align: 'left', sortable: true },
        {
          field: 'IsRegregisterPhone',
          title: '手机用户',
          type: 'int',
          bind: { key: 'isphone', data: [] },
          width: 120,
          hidden: true,
          require: true,
          align: 'left',
        },
        { field: 'PhoneNo', title: '手机号', type: 'string', width: 150, hidden: true, align: 'left' },
        { field: 'Tel', title: 'Tel', type: 'string', width: 90, hidden: true, align: 'left' },
        { field: 'CreateID', title: 'CreateID', type: 'int', width: 90, hidden: true, align: 'left' },
        { field: 'Creator', title: '创建人', type: 'string', width: 130, readonly: true, align: 'left' },
        { field: 'Enable', title: '是否可用', type: 'byte', bind: { key: 'enable', data: [] }, width: 90, require: true, align: 'left' },
        { field: 'ModifyID', title: 'ModifyID', type: 'int', width: 90, hidden: true, align: 'left' },
        { field: 'Modifier', title: '修改人', type: 'string', width: 130, hidden: true, readonly: true, align: 'left' },
        { field: 'ModifyDate', title: '修改时间', type: 'datetime', width: 135, readonly: true, align: 'left', sortable: true },
        { field: 'AuditStatus', title: '审核状态', type: 'int', bind: { key: 'audit', data: [] }, width: 90, hidden: true, align: 'left' },
        { field: 'Auditor', title: '审核人', type: 'string', width: 90, hidden: true, align: 'left' },
        { field: 'AuditDate', title: '审核时间', type: 'datetime', width: 135, hidden: true, align: 'left', sortable: true },
        { field: 'LastLoginDate', title: '最后登陆时间', type: 'datetime', width: 135, hidden: true, align: 'left', sortable: true },
        { field: 'LastModifyPwdDate', title: '最后密码修改时间', type: 'datetime', width: 135, hidden: true, align: 'left', sortable: true },
        { field: 'Address', title: '地址', type: 'string', width: 190, hidden: true, align: 'left' },
        { field: 'Mobile', title: '电话', type: 'string', width: 140, hidden: true, align: 'left' },
        { field: 'Email', title: 'Email', type: 'string', width: 140, hidden: true, align: 'left' },
        { field: 'Remark', title: '备注', type: 'string', width: 180, hidden: true, align: 'left' },
        { field: 'OrderNo', title: '排序号', type: 'int', width: 90, hidden: true, align: 'left' },
      ],
      detail: {
        cnName: '#detailCnName',
        columns: [],
        sortName: '',
        key: '',
      },
    }
  },
}
export default vueParam
</script>
